{smcl}
{txt}{sf}{ul off}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/fcoell/Dropbox/PATSTAT/DATA/../logs/Table_2.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}22 Jun 2020, 10:12:56
{txt}
{com}. di "******************************** Table 2 *********************************"
{res}******************************** Table 2 *********************************
{txt}
{com}. use reg_variables6Granted_WTO, clear
{txt}
{com}. merge m:1 hrm headq nace2_1 using $tmp/allfirms, keep(match)
{res}
{txt}{col 5}Result{col 38}# of obs.
{col 5}{hline 41}
{col 5}not matched{col 30}{res}               0
{txt}{col 5}matched{col 30}{res}         123,174{txt}  (_merge==3)
{col 5}{hline 41}

{com}. collapse lnP taut tautApp (median) P mdlnP = lnP mdtaut = taut mdtautApp = tautApp ///
>         (sd) sdlnP = lnP sdtaut = taut sdtautApp = tautApp (count) nb_firms = hrm, by(y)
{txt}
{com}. list
{txt}
     {c TLC}{hline 6}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 3}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 10}{c TRC}
     {c |} {res}   y        lnP        taut     tautApp   P      mdlnP      mdtaut   mdtautApp      sdlnP      sdtaut   sdtautApp   nb_firms {txt}{c |}
     {c LT}{hline 6}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 3}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 10}{c RT}
  1. {c |} {res}1992   1.413589   .04874428   .03162357   3   1.098612   .04271667    .0198947   1.257967   .04573399   .04685179      41058 {txt}{c |}
  2. {c |} {res}2000   1.827158   .02883816   .01862097   5   1.609438   .02086761   .00777109   1.326807   .03567585   .03309756      41058 {txt}{c |}
  3. {c |} {res}2004   1.974552   .02602642   .01609187   6   1.791759     .019371   .00717441   1.324522   .03197292    .0282217      41058 {txt}{c |}
     {c BLC}{hline 6}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 3}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 10}{c -}{hline 11}{c -}{hline 11}{c -}{hline 10}{c BRC}

{com}. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/fcoell/Dropbox/PATSTAT/DATA/../logs/Table_2.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}22 Jun 2020, 10:12:57
{txt}{.-}
{smcl}
{txt}{sf}{ul off}